﻿/*********************************************************************************
**                                                                              **
**  Copyright (C) 2024 LiLong                                                   **
**  This file is part of RinexFileReader.                                       **
**                                                                              **
**  RinexFileReader is free software: you can redistribute it and/or modify     **
**  it under the terms of the GNU General Public License as published by        **
**  the Free Software Foundation, either version 3 of the License, or           **
**  (at your option) any later version.                                         **
**                                                                              **
**  RinexFileReader is distributed in the hope that it will be useful,          **
**  but WITHOUT ANY WARRANTY; without even the implied warranty of              **
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               **
**  GNU General Public License for more details.                                **
**                                                                              **
**  You should have received a copy of the GNU General Public License           **
**  along with RinexFileReader. If not, see <https://www.gnu.org/licenses/>.    **
**********************************************************************************/
#pragma once

#include "Datadefine.h"
#include "RinexFileReaderGlobal.h"

#include <memory>

namespace Rinex
{
struct MeteorologicalData;
class RINEXFILEREADER_EXPORT MeteorologicalDataFile
{
public:
    MeteorologicalDataFile(MeteorologicalDataFile&& other) noexcept;
    MeteorologicalDataFile(const MeteorologicalDataFile& other);
    ~MeteorologicalDataFile();
    MeteorologicalDataFile& operator=(MeteorologicalDataFile&& other) noexcept;
    MeteorologicalDataFile& operator=(const MeteorologicalDataFile& other);
    // IONEX VERSION / TYPE
    double version() const;
    // PGM / RUN BY / DATE
    const std::string& program() const;
    const std::string& agency() const;
    const std::string& createDateTime() const;
    // COMMENT
    const std::vector<std::string>& comments() const;
    // MARKER NAME
    const std::string& markerName() const;
    // MARKER NUMBER
    const std::optional<std::string>& markerNumber() const;
    // # / TYPES OF OBSERV
    const std::vector<ObservationType>& observationTypes() const;
    // SENSOR MOD/TYPE/ACC
    const std::vector<SensorModTypeAcc>& sensorModTypeAcc() const;
    // SENSOR POS XYZ/H
    const std::vector<SensorPosXYZH>& sensorPosXYZH() const;
    ////////////////////////////////////////////
    const std::vector<MetData>& datas() const;

protected:
    MeteorologicalDataFile(std::shared_ptr<MeteorologicalData> d);
    friend class RindexFile;

private:
    struct Impl;
    std::unique_ptr<Impl> m_impl;
};
} // namespace Rinex